/*
 * OrganizeApp.java
 */

package organize;

import com.sun.java.swing.plaf.windows.resources.windows;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;

/**
 * The main class of the application.
 */
public class OrganizeApp extends SingleFrameApplication {

public static SplashScreen FormSplash;
public static Thread ThFormSplash;

    /**
     * At startup create and show the main frame of the application.
     */
    @Override protected void startup() {
       // this.getMainFrame().setBounds(0, 0, 200, 200);
        show(new OrganizeView(this));
        
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of OrganizeApp
     */
    public static OrganizeApp getApplication() {
        return Application.getInstance(OrganizeApp.class);
    }

    /**
     * Main method launching the application.
     */

protected static void loadSplashScreen()
{

    ThFormSplash.start();
    while(!FormSplash.isVisible())
    {
        try{Thread.sleep(3000);}
        catch(InterruptedException e){}
    }

}


    public static void main(String[] args) throws FileNotFoundException {

        FormSplash = new SplashScreen();
        ThFormSplash = new Thread(FormSplash);


                        // Connect print stream to the output stream

        loadSplashScreen();
        FormSplash.dispose();

        System.out.println("ahsan");
        launch(OrganizeApp.class, args);
    }
}
